#ifndef YAAL_MSVCXX_CTIME_INCLUDED
#define YAAL_MSVCXX_CTIME_INCLUDED 1

#define log cmath_log
#include <pthread.h>
#undef log
#include <../include/ctime>
#include "cleanup.hxx"

typedef int clockid_t;
typedef int long suseconds_t;

char* strptime( char const*, char const*, struct tm* );

inline struct tm *gmtime_r(const time_t *timep, struct tm *result) {
	gmtime_s( result, timep );
	return result;
}

inline struct tm *localtime_r(const time_t *timep, struct tm *result) {
	localtime_s( result, timep );
	return result;
}

namespace msvcxx {
inline int long long difftime( int long long end_, int long long start_ ) {
	return ( end_ - start_ );
}
}

#define difftime msvcxx::difftime

static int const SIGEV_SIGNAL = 0;

union sigval {
	int sival_int;
	void* sival_ptr;
};

struct sigevent {
	sigval sigev_value;
	int sigev_signo;
	int sigev_notify;
};

#endif /* not YAAL_MSVCXX_CTIME_INCLUDED */
// vim: ft=cpp
